'''
Created on 2010-3-3

@author: Administrator
'''
import sys
from jolly.datastructures.Visitor import Visitor

class PrePostVisitor(Visitor):
    '''
    Pre/Post visitor class.
    '''


    def __init__(self):
        '''
        (PrePostVisitor) -> None
        Constructor.
        '''
        super(PrePostVisitor, self).__init__()
    
    def preVisit(self, obj):
        '''
        (PrePostVisitor, Object) -> None
        Default pre-visit method does nothing.
        '''
        pass
    
    def inVisit(self, obj):
        '''
        (PrePostVisitor, Object) -> None
        Default in-visit method does nothing.
        '''
        pass
    
    def postVisit(self, obj):
        '''
        (PrePostVisitor, Object) -> None
        Default post-visit method does nothing.
        '''
        pass
    
    visit = inVisit
    
    @staticmethod
    def main(*argv):
        "PrePostVisitor test program."
        print PrePostVisitor.main.__doc__
        v = PrePostVisitor()
        print v.isDone
        return 0

if __name__ == "__main__":
    sys.exit(PrePostVisitor.main(*sys.argv))